import {request} from '@/libs/js/request.js'

export function getHomeList(data, option = {method: 'POST'}) {
  return request('/eat/eat/restaurants/homeList', data, option);
}

// todo��
export function restaurantsLike(data, option = {method: 'POST'}) {
  return request('/eat/eat/restaurantslikes', data, option);
}

export function getRestaurantInfo(data, option = {method: 'GET'}) {
  return request(`/eat/eat/restaurants`, data, option);
}

export function postRestaurantLabel(data, option = {method: 'POST'}) {
  return request(`/eat/eat/restaurantslabellog`, data, option);
}

export function getRestaurantLabels(data, option = {method: 'GET'}) {
  return request(`/eat/eat/restaurantslabellog/restaurantsLabel`, data, option);
}

export function getNearRestaurants(data, option = {method: 'POST'}) {
  return request(`/eat/eat/restaurants/restaurantDistance`, data, option);
}

export function postRestaurantRecord(data, option = {method: 'POST'}) {
  return request(`/eat/eat/restaurantsrecord`, data, option);
}

export function getRestaurantRecords(data, option = {method: 'GET'}) {
  return request(`/eat/eat/restaurantsrecord/page`, data, option);
}

export function dianzanRecord(data, option = {method: 'GET'}) {
  return request(`/eat/eat/restaurantsrecord/dianzan`, data, option);
}
  
export function getRestaurantRecord(data, option = {method: 'GET'}) {
  return request(`/eat/eat/restaurantsrecord/get`, data, option);
}

export function postRecordReview(data, option = {method: 'POST'}) {
  return request(`/eat/eat/restaurantsrecord/review`, data, option);
}

export function getRecordReviews(data, option = {method: 'GET'}) {
  return request(`/eat/eat/restaurantsrecord/review/list`, data, option);
}

export function getMineLikes(data, option = {method: 'POST'}) {
  return request(`/eat/api/center/like/page`, data, option);
}

export function getMineRecords(data, option = {method: 'GET'}) {
  return request(`/eat/eat/restaurantsrecord/page`, data, option);
}

export function getFriends(data, option = {method: 'GET'}) {
  return request(`/eat/eat/userfollows/page`, data, option);
}

export function postFollowUser(data, option = {method: 'POST'}) {
  return request(`/eat/eat/userfollows/followUser`, data, option);
}